import java.util.Comparator;
import java.util.PriorityQueue;

class Student implements Comparable<Student> {
    int age;

    public Student(int age) {
        this.age = age;
    }

    @Override
    public int compareTo(Student o) {
        return this.age-o.age;
    }
}
class AgeComparator implements Comparator<Student>{
    @Override
    public int compare(Student o1, Student o2) {
        return o1.age-o2.age;
    }
}
public class Test {
    public static void main(String[] args) {
        AgeComparator ageComparator=new AgeComparator();
        PriorityQueue<Student>priorityQueue=new PriorityQueue<>(new Comparator<Student>() {
            @Override
            public int compare(Student o1, Student o2) {
                return o1.age-o2.age;
            }
        });
        priorityQueue.offer(new Student(15));
        priorityQueue.offer(new Student(5));
    }

    public static void main1(String[] args) {
        TestHeap testHeap=new TestHeap();
        int[]arr={27,15,19,18,28,34,65,49,25,37};
        testHeap.creatArray(arr);
        testHeap.createHeap();
        testHeap.shiftUp(80);

        for (int i = 0; i < testHeap.getUsedSize(); i++) {
            System.out.print(testHeap.getElem()[i]+" ");
        }
        System.out.println();
        testHeap.delete();
        for (int i = 0; i < testHeap.getUsedSize(); i++) {
            System.out.print(testHeap.getElem()[i]+" ");
        }
    }
}
